<!--
 * @Description: el-select 下拉组件 footer 引导按钮插槽组件
 * @Author: James324
 * @Date: 2024-01-10 14:33:32
 * @LastEditors: James324
 * @LastEditTime: 2024-01-12 11:18:06
-->
<script setup lang="ts">
import { FolderAdd } from '@element-plus/icons-vue';

defineProps({
    text: {
        type: String,
        default: '去新增'
    },
    isText: {
        type: Boolean, // 是否为文字按钮类型
        default: true
    }
});
</script>

<template>
    <div v-if="isText" class="m-push__buttons">
        <el-text type="primary">
            <el-icon><FolderAdd /></el-icon> {{ text }}
        </el-text>
    </div>
    <el-button v-else type="primary" v-bind="$attrs" plain :icon="FolderAdd">去新增</el-button>
</template>

<style lang="scss" scoped>
@include b(m-push) {
    @include e(buttons) {
        text-align: center;
    }
}
</style>
